package com.example.demo.entity;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

public class CustomUser extends User {

    private com.example.demo.entity.User user;

    public CustomUser(com.example.demo.entity.User user, Collection<? extends GrantedAuthority> authorities) {
        super(user.getUsername(), user.getPassword(), authorities);
        this.user = user;
    }

    public com.example.demo.entity.User getUser() {
        return user;
    }

    public void setUser(com.example.demo.entity.User user) {
        this.user = user;
    }
}
